package com.cloud.rou.im.connection.container.session;

import com.cloud.rou.im.connection.container.connection.Connection;
import io.netty.channel.ChannelHandlerContext;

import java.util.ArrayList;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 */
public class ConnectSessionFactory {

    public static Session createSession(Long userId, ChannelHandlerContext ctx){
        return Session.builder()
                .userId(userId)
                .connection(new Connection(userId,ctx))
                .listeners(new ArrayList<>())
                .build();
    }
}
